#ifndef __GLF_TASK_TASKHANDLERPOLICY_DECL_H_INCLUDED__
#define __GLF_TASK_TASKHANDLERPOLICY_DECL_H_INCLUDED__

#include <glf/core/inlines.h>

namespace glf {

template<typename Tag>
class TaskHandlerConsumeSingle
{
public:
	bool Consume();
};

template<typename Tag>
class TaskHandlerConsumeDrain : public TaskHandlerConsumeSingle<Tag>
{
public:
	bool Consume();
};

template<typename Tag>
class TaskHandlerConsumeTimeSlice : public TaskHandlerConsumeSingle<Tag>
{
public:
	TaskHandlerConsumeTimeSlice();
	TaskHandlerConsumeTimeSlice(int64 timeSlice);

	void SetTimeSlice(int64 timeSlice);

	bool Consume();

private:
	static const int DEFAULT_TIME_SLICE = 1000;
	int64 m_TimeSlice;
};

template<typename Tag>
class TaskHandlerConsumePolicy : public TaskHandlerConsumeSingle<Tag>
{
};

} // end namespace glf

#endif // __GLF_TASK_TASKHANDLERPOLICY_DECL_H_INCLUDED__
